﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.CopsBanditsUI {
    import flash.display.*;
    import org.aswing.*;
    import Display.ValentineUI.*;
    import Display.aswingui.*;

    public class BanditsScrollingList extends AchievementsScrollingList {

        public function BanditsScrollingList(_arg1:Array, _arg2:Class, _arg3:int, _arg4:int=0, _arg5:int=1){
            super(_arg1, _arg2, _arg3, _arg4, _arg5);
            this.addBorder();
        }
        protected function addBorder():void{
            var _local1:Sprite = new Sprite();
            var _local2:DisplayObject = (new (CopsDialog.assetDict["police_innerBorder"])() as DisplayObject);
            addChild(_local2);
            _local2.width = 580;
            _local2.height = 311;
            _local2.x = 41;
            _local2.y = -1;
            var _local3:DisplayObject = (new (CopsDialog.assetDict["police_divider"])() as DisplayObject);
            _local3.x = 184;
            _local3.y = 30;
            var _local4:DisplayObject = (new (CopsDialog.assetDict["police_divider"])() as DisplayObject);
            _local4.x = 331;
            _local4.y = 30;
            var _local5:DisplayObject = (new (CopsDialog.assetDict["police_divider"])() as DisplayObject);
            _local5.x = 479;
            _local5.y = 30;
            _local1.addChild(_local2);
            _local1.addChild(_local3);
            _local1.addChild(_local4);
            _local1.addChild(_local5);
            addChild(_local1);
            _local1.mouseChildren = (_local1.mouseEnabled = false);
        }
        override protected function makeSize():void{
            this.setPreferredHeight(BanditsCell.BANDIT_CELL_HEIGHT);
            ASwingHelper.setForcedWidth(m_scrollPane, this.getScrollWidth());
            m_dataList.setHGap(0);
        }
        override public function getScrollWidth():int{
            return ((BanditsCell.BANDIT_CELL_WIDTH * m_columns));
        }
        override protected function makeButtons():void{
            var _local1:DisplayObject = (new (CopsDialog.assetDict["police_prevButton_up"])() as DisplayObject);
            var _local2:DisplayObject = (new (CopsDialog.assetDict["police_prevButton_down"])() as DisplayObject);
            var _local3:DisplayObject = (new (CopsDialog.assetDict["police_prevButton_over"])() as DisplayObject);
            var _local4:DisplayObject = (new (CopsDialog.assetDict["police_nextButton_up"])() as DisplayObject);
            var _local5:DisplayObject = (new (CopsDialog.assetDict["police_nextButton_down"])() as DisplayObject);
            var _local6:DisplayObject = (new (CopsDialog.assetDict["police_nextButton_over"])() as DisplayObject);
            prevButton = new JButton();
            prevButton.wrapSimpleButton(new SimpleButton(_local1, _local3, _local2, _local1));
            prevButton.setEnabled(false);
            nextButton = new JButton();
            nextButton.wrapSimpleButton(new SimpleButton(_local4, _local6, _local5, _local4));
            if (m_data.length <= NUM_ITEMS){
                nextButton.setEnabled(false);
            } else {
                nextButton.setEnabled(true);
            };
            prevButton.addActionListener(moveLeft, 0, true);
            nextButton.addActionListener(moveRight, 0, true);
        }

    }
}//package Display.CopsBanditsUI 
